#include <stdio.h>
unsigned char transfor(int x);
int main()
{
    int i = 10;
    char a = 1;
    unsigned char b = 200;
    printf("%d", transfor(b + a * i));
}
unsigned char transfor(int x)
{
    if (x < 0)
    {
        return 0;
    }
    if (x > 255)
    {
        return 255;
    }
    return x;
}